/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="domain")
public class Domain implements Serializable {
	public Domain() {
	}
	
	private int id;
	
	private Integer memberId;
	
	private String domain;
	
	public void setId(int value) {
		this.id = value;
	}
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_DOMAIN_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_DOMAIN_ID_GENERATOR", strategy="identity")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	public void setMemberId(int value) {
		setMemberId(new Integer(value));
	}
	
	public void setMemberId(Integer value) {
		this.memberId = value;
	}
	
	@Column(name="memberId", nullable=true, length=10)	
	public Integer getMemberId() {
		return memberId;
	}
	
	public void setDomain(String value) {
		this.domain = value;
	}
	
	@Column(name="domain", nullable=true, length=255)	
	public String getDomain() {
		return domain;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("Domain[ ");
			sb.append("Id=").append(getId()).append(" ");
			sb.append("MemberId=").append(getMemberId()).append(" ");
			sb.append("Domain=").append(getDomain()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
